<?php
/**
 * Created by PhpStorm.
 * User: wliu
 * Date: 14-3-30
 * Time: 下午9:12
 */

class CowryComment extends EMongoDocument {
    //买家
    public $userid;
    //评论时间
    public $createtime;

    //品论内容
    public $content;
    //商品
    public $cowry;

    public $local='zn';

    /**
     * This method have to be defined in every Model
     * @return string MongoDB collection name, witch will be used to store documents of this model
     */
    public function getCollectionName()
    {
        return 'cowry_comment';
    }

    // We can define rules for fields, just like in normal CModel/CActiveRecord classes
    public function rules()
    {
        return array(

        );
    }

    // the same with attribute names
    public function attributeNames() {
        return array(
            //'ad' => 'ad',
            'userid'=>'userid',
            'createtime'=>'createtime',
            'content'=>'content',
            'local'=>'local',
            'cowry'=>'cowry',
        );
    }

    /**
     * This method have to be defined in every model, like with normal CActiveRecord
     */
    public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }

} 